﻿
<section id="mainVote">
@model ChoregraphyMix
           
  
    <h3>Coregrafia @Model.ChoregraphyID - @Model.ChoregraphyName </h3>

    @using (Html.BeginForm()){

        <input type=hidden name=ChoregraphyID value=@Model.ChoregraphyID />
        foreach (PYS.VoteWorkflow mix in Model.Workflow)
        {
        <div class="radio">
         @{ 
            string src, nameMix;
            
            <span class="radioText">
               @Html.RadioButtonFor(c => c.SelectedAnswer, mix.mixID, new {id=mix.chID})<label for=@mix.chID> @mix.mixName</label>
            </span>
            nameMix = @mix.mixName.ToString();
            nameMix = nameMix.ToLower();
            nameMix = nameMix.Replace(" ", "");
            src = "../Music/" + nameMix + "/" + @mix.chTypeID + ".mp3";
             <audio controls style="width:70%">
                 <source src="@src" type="audio/mpeg"/>
                 <source src="@src" type="audio/ogg"/>
                 <source src="@src" type="audio/wav"/>
             </audio>
             <br />  
          }
        </div>
        }
       
    <hr />
      
     
        int b = 0, f = 0;
        string id3 = Request.QueryString["id3"];

        if (id3 != null)
        {
            <span>
                <input type="submit" name="confirm" value="Confirmare"  id="okChangeVoteButton"/>
            </span>
        }
        else
        {
            if (Model.ChoregraphyID > 1)
            {
              <span>
                  <input name="back" type=submit value="Inapoi" class="backButton" />
              </span>  
                b = 1;
            }



            if (Model.ChoregraphyID <= 11)
            {
                    <span>           
                        <input name="fw" type=submit value="Inainte" class="forwardButton" />
                    </span>    
                f = 1;
            }


            if (b == 1 && f == 1)
            {
                        <span>
                           <a href="../Home"><img src="../Content/images/cancel.png" style=" border:none !important;"/></a>
                        </span>
            }
            else
            {
                if (b == 0 && f == 1)
                {
                        <span style="float:left">
                         <a href="../Home"><img src="../../pys/Content/images/cancel.png" style=" border:none !important;"/></a>
                        </span>
                }
            }
        }
        }
  </section>